package com.sskj.functions.presenter;

import com.lzy.okgo.model.Response;
import com.sskj.common.base.HttpData;
import com.sskj.functions.activity.FunctionsAgreementActivity;
import com.sskj.lib.http.JsonCallBack;


/**
 * @author Hey
 * Create at  2019/07/10
 */
public class FunctionsAgreementPresenter extends BasePresenter<FunctionsAgreementActivity> {

    public void getAgreement(String type, String languages) {
        httpService.getAgreement(type, languages)
                .tag(this)
                .execute(new JsonCallBack<HttpData>() {
                    @Override
                    public void onSuccess(Response<HttpData> response) {
                        String data = (String) response.body().getData();
                        mView.getAgreementSuccess(data);
                    }
                });
    }
}
